package com.handyshop.mall.dubbo.pay.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.handyshop.mall.dubbo.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;

@ApiModel(value = "订单支付表")
@Data
@EqualsAndHashCode(callSuper = true)
@TableName(value = "nrs_bill")
public class Bill extends BaseEntity {
    /**
     * 账单流水号
     */
    @TableField(value = "bill_id")
    @ApiModelProperty(value = "账单流水号")
    private Long billId;

    /**
     * 商家ID
     */
    @TableField(value = "merchant_id")
    @ApiModelProperty(value = "商家ID")
    private Long merchantId;

    /**
     * 单据类型(0:支付单,1:退款单)
     */
    @TableField(value = "`type`")
    @ApiModelProperty(value = "单据类型(0:支付单,1:退款单)")
    private Byte type;

    /**
     * 业务对象
     */
    @TableField(value = "pay_object")
    @ApiModelProperty(value = "业务对象")
    private Object payObject;

    /**
     * 支付金额
     */
    @TableField(value = "money")
    @ApiModelProperty(value = "支付金额")
    private BigDecimal money;

    /**
     * 相关会员
     */
    @TableField(value = "user_id")
    @ApiModelProperty(value = "相关会员")
    private Long userId;

    /**
     * 相关订单
     */
    @TableField(value = "order_id")
    @ApiModelProperty(value = "相关订单")
    private Long orderId;

    /**
     * 支付状态
     */
    @TableField(value = "`status`")
    @ApiModelProperty(value = "支付状态")
    private Object status;

    /**
     * 付款方式
     */
    @TableField(value = "pay_mode")
    @ApiModelProperty(value = "付款方式")
    private Object payMode;

    /**
     * 收款者名称
     */
    @TableField(value = "payee_name")
    @ApiModelProperty(value = "收款者名称")
    private String payeeName;

    /**
     * 收款者账号
     */
    @TableField(value = "payee_account")
    @ApiModelProperty(value = "收款者账号")
    private String payeeAccount;

    /**
     * 收款者银行
     */
    @TableField(value = "payee_bank")
    @ApiModelProperty(value = "收款者银行")
    private String payeeBank;

    /**
     * 付款者名称
     */
    @TableField(value = "payer_name")
    @ApiModelProperty(value = "付款者名称")
    private String payerName;

    /**
     * 付款者账户
     */
    @TableField(value = "payer_account")
    @ApiModelProperty(value = "付款者账户")
    private String payerAccount;

    /**
     * 付款者银行
     */
    @TableField(value = "payer_bank")
    @ApiModelProperty(value = "付款者银行")
    private String payerBank;

    /**
     * 支付应用程序
     */
    @TableField(value = "pay_app_id")
    @ApiModelProperty(value = "支付应用程序")
    private String payAppId;

    /**
     * 手续费
     */
    @TableField(value = "pay_fee")
    @ApiModelProperty(value = "手续费")
    private BigDecimal payFee;

    /**
     * 单据发起者IP
     */
    @TableField(value = "ip")
    @ApiModelProperty(value = "单据发起者IP")
    private String ip;

    /**
     * 支付网关回调网址
     */
    @TableField(value = "return_url")
    @ApiModelProperty(value = "支付网关回调网址")
    private String returnUrl;

    /**
     * 支付平台流水号
     */
    @TableField(value = "out_trade_no")
    @ApiModelProperty(value = "支付平台流水号")
    private String outTradeNo;

    /**
     * 相关支付平台流水号(做退款用)
     */
    @TableField(value = "transaction_id")
    @ApiModelProperty(value = "相关支付平台流水号(做退款用)")
    private String transactionId;

    /**
     * 是否原路退回
     */
    @TableField(value = "auto_refund")
    @ApiModelProperty(value = "是否原路退回")
    private Object autoRefund;

    /**
     * 备注
     */
    @TableField(value = "note")
    @ApiModelProperty(value = "备注")
    private String note;

    /**
     * 支付单支付时间
     */
    @TableField(value = "pay_time")
    @ApiModelProperty(value = "支付单支付时间")
    private Integer payTime;

    public static final String COL_ID = "id";

    public static final String COL_BILL_ID = "bill_id";

    public static final String COL_MERCHANT_ID = "merchant_id";

    public static final String COL_TYPE = "type";

    public static final String COL_PAY_OBJECT = "pay_object";

    public static final String COL_MONEY = "money";

    public static final String COL_USER_ID = "user_id";

    public static final String COL_ORDER_ID = "order_id";

    public static final String COL_STATUS = "status";

    public static final String COL_PAY_MODE = "pay_mode";

    public static final String COL_PAYEE_NAME = "payee_name";

    public static final String COL_PAYEE_ACCOUNT = "payee_account";

    public static final String COL_PAYEE_BANK = "payee_bank";

    public static final String COL_PAYER_NAME = "payer_name";

    public static final String COL_PAYER_ACCOUNT = "payer_account";

    public static final String COL_PAYER_BANK = "payer_bank";

    public static final String COL_PAY_APP_ID = "pay_app_id";

    public static final String COL_PAY_FEE = "pay_fee";

    public static final String COL_IP = "ip";

    public static final String COL_RETURN_URL = "return_url";

    public static final String COL_OUT_TRADE_NO = "out_trade_no";

    public static final String COL_TRANSACTION_ID = "transaction_id";

    public static final String COL_AUTO_REFUND = "auto_refund";

    public static final String COL_NOTE = "note";

    public static final String COL_PAY_TIME = "pay_time";

    public static final String COL_DELETE_FLAG = "delete_flag";

    public static final String COL_CREATOR_ID = "creator_id";

    public static final String COL_CREATOR = "creator";

    public static final String COL_CREATE_TIME = "create_time";

    public static final String COL_MODIFY_TIME = "modify_time";
}